import { IForm } from '@/base-ui/form'

export const popupConfig: IForm = {
  title: 'new user',
  formItems: [
    {
      field: 'email',
      type: 'input',
      label: 'email',
      placeHolder: 'input firstname',
      rules: [
        { required: true, message: 'email can not be empty', trigger: 'blur' },
        {
          type: 'email',
          message: 'note the email form',
          trigger: ['blur', 'change']
        }
      ]
    },
    {
      field: 'hash',
      type: 'password',
      label: 'passwd',
      placeHolder: 'input password',
      isHidden: false,
      rules: [{ required: true }]
    },
    {
      field: 'firstName',
      type: 'input',
      label: 'firstName',
      placeHolder: 'input firstname'
    },
    {
      field: 'lastName',
      type: 'input',
      label: 'lastName',
      placeHolder: 'input lastname'
    },
    {
      field: 'phone',
      type: 'input',
      label: 'cellphone',
      placeHolder: 'input phonenumber'
    }
  ],
  colLayout: { span: 24 },
  itemStyle: { padding: 0 }
}
